﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"
	isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath();
			String basePath = request.getScheme() + "://"
					+ request.getServerName() + ":" + request.getServerPort()
					+ path + "/";
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath()%>/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/select-ui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/editor/kindeditor.js"></script>

<script type="text/javascript">
    KE.show({
        id : 'content7',
        cssPath : './index.css'
    });
  </script>
  
<script type="text/javascript">
$(document).ready(function(e){
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 100
	});
});
</script>
<style type="text/css">
	label{
		font-size:13;
	}
	select{
		opacity:1;
	}
</style>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><e>首页</e></li>
    <li><e>用户管理</e></li>
    <li><e>身份审核</e></li>
    <li><e>查看详情</e></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    
    <div id="usual1" class="usual"> 
    
    <div class="itab">
  	<ul> 
    <li><a href="#tab1" class="selected" style="font-size:15">用户身份详情</a></li> 
    
  	</ul>
    </div> 
    
  	<div id="tab1" class="tabson">
    <c:forEach items="${lists}" var="data">
    <ul class="forminfo">
    <li><input type="hidden" value="${data.user_id}"/></li>
    <li><label>昵称</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.name}" style="font-size:13"/></li>
    <li><label>手机号</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.mobile}" style="font-size:13"/></li>
    <li><label>真实姓名</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.username}" style="font-size:13"/></li>
    <li><label>证件类型</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="身份证" style="font-size:13"/></li>
    <li><label>证件号码</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.identity_card}" style="font-size:13"/></li>
   	<li><label>身份证正面</label><img src="${data.identity_front}" height="180px" width="300px"/><strong id="job1"></strong></li>
   	<li><label>身份证反面</label><img src="${data.identity_side}" height="180px" width="300px"/><strong id="job1"></strong></li>
    <li><label>提交时间</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.create_time}" style="font-size:13"/></li>
    <li><label>注册城市</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.address}" style="font-size:13"/></li>
    <li><label>审核人</label><input name="background" type="text" class="dfinput"  readonly ="readonly" value="${data.auditName}" style="font-size:13"/></li>
   <c:if test="${a==1}">
    <li><label>实名认证</label>
    	 <select name="status" id="ident" class="dfinput" disabled="disabled" >
			<c:if test="${data.audit == 0 || data.audit == 2}">
				<option value="0" selected="selected">未认证</option>
				<option value="1">已认证</option>
			</c:if>
			<c:if test="${data.audit == 1}">
				<option value="0">未认证</option>
				<option value="1" selected="selected">已认证</option>
			</c:if>
		 </select>
    </li>
    <li><label>人脸认证</label>
    	<select name="status" id="face" class="dfinput" disabled="disabled" >
			<c:if test="${data.face_statu == 0 || data.face_statu == NULL}">
				<option value="0" selected="selected">未认证</option>
				<option value="1">已认证</option>
			</c:if>
			<c:if test="${data.face_statu == 1}">
				<option value="0">未认证</option>
				<option value="1" selected="selected">已认证</option>
			</c:if>
		 </select>
    </li>
   </c:if>
   	<c:if test="${a==null}">
   	<li><label>实名认证</label>
    	 <select name="status" id="ident" class="dfinput" >
			<c:if test="${data.audit == 0 || data.audit == 2}">
				<option value="0" selected="selected">未认证</option>
				<option value="1">已认证</option>
			</c:if>
			<c:if test="${data.audit == 1}">
				<option value="0">未认证</option>
				<option value="1" selected="selected">已认证</option>
			</c:if>
		 </select>
    </li>
    <li><label>人脸认证</label>
    	<select name="status" id="face" class="dfinput" >
			<c:if test="${data.face_statu == 0 || data.face_statu == NULL}">
				<option value="0" selected="selected">未认证</option>
				<option value="1">已认证</option>
			</c:if>
			<c:if test="${data.face_statu == 1}">
				<option value="0">未认证</option>
				<option value="1" selected="selected">已认证</option>
			</c:if>
		 </select>
    </li>
   	</c:if>
    </ul>
    </c:forEach>
    <div style="margin-left:150px;">
    <input name="fanhui" type="button" value="返回" style="width:96px; height:35px; line-height:35px; color:#fff; background:red; font-size:14px; font-weight:bold;border-radius: 3px; cursor:pointer;"/>
    	<c:if test="${a==1}">
					<c:if test="${lists[0].audit == '0'  || lists[0].audit == null }">
			<input  type="button" value="审核通过" onclick="adopt();" style="width:96px; height:35px; line-height:35px; color:#fff; background:red; font-size:14px; font-weight:bold;border-radius: 3px; cursor:pointer;"/>
			</c:if>
			</c:if>
			<c:if test="${a==null}">
			<input name="baocun" type="button" value="保存" style="width:96px; height:35px; line-height:35px; color:#fff; background:red; font-size:14px; font-weight:bold;border-radius: 3px; cursor:pointer;"/>
			</c:if>
    	
    </div> 
  </div>
  	<script type="text/javascript">
	var flag = true,//状态true为正常的状态,false为放大的状态
//状态true为正常的状态,false为放大的状态
    imgH,//图片的高度
    imgW,//图片的宽度
    img = document.getElementsByTagName('img')[0];//图片元素
  
img.onclick =  function(){
//图片点击事件
imgH = img.height; //获取图片的高度
imgW = img.width; //获取图片的宽度
if(flag){
    //图片为正常状态,设置图片宽高为现在宽高的2倍
    flag = false;//把状态设为放大状态
    img.height = imgH*4.5;
    img.width = imgW*4.5;
}else{
    //图片为放大状态,设置图片宽高为现在宽高的二分之一
    flag = true;//把状态设为正常状态
    img.height = imgH/4.5;
    img.width = imgW/4.5;
}

}

var flag1 = true,
   img1H,//图片的高度
    img1W,//图片的宽度
    img1 = document.getElementsByTagName('img')[1];//图片元素
img1.onclick =  function(){
	//图片点击事件
	imgH = img1.height; //获取图片的高度
	imgW = img1.width; //获取图片的宽度
	if(flag1){
	    //图片为正常状态,设置图片宽高为现在宽高的2倍
	    flag1 = false;//把状态设为放大状态
	    img1.height = imgH*4.5;
	    img1.width = imgW*4.5;
	}else{
	    //图片为放大状态,设置图片宽高为现在宽高的二分之一
	    flag1 = true;//把状态设为正常状态
	    img1.height = imgH/4.5;
	    img1.width = imgW/4.5;
	}

	}
    
   		$(document).ready(function(){
   			$("input[name=fanhui]").click(function(){
	   			window.location.href="/htx-backer/selectIdentityList";
	   		});
    	})
    	
    	$("#ident").change(function(){
	    	var ident = $("#ident").val();
	    	if(ident == 1){
		    	$("#face").find("option:contains('已认证')").attr("selected",true);
	    	}else{
	    		$("#face").find("option:contains('未认证')").attr("selected",true);
	    	}
    	})
    	$("#face").change(function(){
	    	var face = $("#face").val();
	    	if(face == 1){
		    	$("#ident").find("option:contains('已认证')").attr("selected",true);
	    	}else{
	    		$("#ident").find("option:contains('未认证')").attr("selected",true);
	    	}
    	})
    	
    	$("input[name=baocun]").click(function(){
    		var ident = $("#ident").val();
    		var user_id = $("input[type=hidden]").val();
    		var flag = confirm("是否确认保存？");
    		if(flag){
	    		window.location.href="/htx-backer/updateIdentityStatus?audit=" + ident + "&user_id=" + user_id;
    		}
    	})
    	function adopt(){
    		var ident = 1;
    		var user_id = $("input[type=hidden]").val();
   			var flag = confirm("是否确认审核通过？");
    		if(flag){
	    		window.location.href="/htx-backer/updateIdentityStatus?audit=" + ident + "&user_id=" + user_id;
    		}
   		}
   		function notPass(){
    		var ident = 2;
    		var user_id = $("input[type=hidden]").val();
   			var flag = confirm("是否确认审核不通过？");
    		if(flag){
	    		window.location.href="/htx-backer/updateIdentityStatus?audit=" + ident + "&user_id=" + user_id;
    		}
   		}
    </script>
</body>
</html>
